home *** CD-ROM | disk | FTP | other *** search
- #ifndef _PPCPRAGMA_MIAMIBPF_H
- #define _PPCPRAGMA_MIAMIBPF_H
-
- #ifndef POWERUP_PPCLIB_INTERFACE_H
- #include <powerup/ppclib/interface.h>
- #endif
-
- #ifndef POWERUP_GCCLIB_PROTOS_H
- #include <powerup/gcclib/powerup_protos.h>
- #endif
-
- #ifndef NO_PPCINLINE_STDARG
- #define NO_PPCINLINE_STDARG
- #endif/* SAS C PPC inlines */
-
- #ifndef MIAMIBPF_BASE_NAME
- #define MIAMIBPF_BASE_NAME MiamiBPFBase
- #endif
-
- #define MiamiBPFInit(m,b) _MiamiBPFInit(MIAMIBPF_BASE_NAME,m,b)
-
- static __inline void
- _MiamiBPFInit(void *MiamiBPFBase,struct Library *m,struct Library *b) {
- struct Caos MyCaos;
- MyCaos.M68kCacheMode=IF_CACHEFLUSHALL;
- MyCaos.PPCCacheMode=IF_CACHEFLUSHALL;
- MyCaos.a0=(ULONG)m;
- MyCaos.a1=(ULONG)b;
- MyCaos.caos_Un.Offset=-30;
- MyCaos.a6=(ULONG)MiamiBPFBase;
- PPCCallOS(&MyCaos);
- }
-
- #define MiamiBPFOpen(t) _MiamiBPFOpen(MIAMIBPF_BASE_NAME,t)
-
- static __inline unsigned long
- _MiamiBPFOpen(void *MiamiBPFBase,struct TagItem *t) {
- struct Caos MyCaos;
- MyCaos.M68kCacheMode=IF_CACHEFLUSHALL;
- MyCaos.PPCCacheMode=IF_CACHEFLUSHALL;
- MyCaos.a0=(ULONG)t;
- MyCaos.caos_Un.Offset=-36;
- MyCaos.a6=(ULONG)MiamiBPFBase;
- return (unsigned long)PPCCallOS(&MyCaos);
- }
-
- #define MiamiBPFClose(i) _MiamiBPFClose(MIAMIBPF_BASE_NAME,i)
-
- static __inline void
- _MiamiBPFClose(void *MiamiBPFBase,unsigned long i) {
- struct Caos MyCaos;
- MyCaos.M68kCacheMode=IF_CACHEFLUSHALL;
- MyCaos.PPCCacheMode=IF_CACHEFLUSHALL;
- MyCaos.d0=(ULONG)i;
- MyCaos.caos_Un.Offset=-42;
- MyCaos.a6=(ULONG)MiamiBPFBase;
- PPCCallOS(&MyCaos);
- }
-
- #define MiamiBPFRead(i,b,l) _MiamiBPFRead(MIAMIBPF_BASE_NAME,i,b,l)
-
- static __inline long
- _MiamiBPFRead(void *MiamiBPFBase,unsigned long i,unsigned char *b,unsigned long l) {
- struct Caos MyCaos;
- MyCaos.M68kCacheMode=IF_CACHEFLUSHALL;
- MyCaos.PPCCacheMode=IF_CACHEFLUSHALL;
- MyCaos.d0=(ULONG)i;
- MyCaos.a0=(ULONG)b;
- MyCaos.d1=(ULONG)l;
- MyCaos.caos_Un.Offset=-48;
- MyCaos.a6=(ULONG)MiamiBPFBase;
- return (long)PPCCallOS(&MyCaos);
- }
-
- #define MiamiBPFSignalmask(i) _MiamiBPFSignalMask(MIAMIBPF_BASE_NAME,i)
-
- static __inline unsigned long
- _MiamiBPFSignalMask(void *MiamiBPFBase,unsigned long i) {
- struct Caos MyCaos;
- MyCaos.M68kCacheMode=IF_CACHEFLUSHALL;
- MyCaos.PPCCacheMode=IF_CACHEFLUSHALL;
- MyCaos.d0=(ULONG)i;
- MyCaos.caos_Un.Offset=-54;
- MyCaos.a6=(ULONG)MiamiBPFBase;
- return (unsigned long)PPCCallOS(&MyCaos);
- }
-
- #define MiamiBPFIoctl(i,c,d) _MiamiBPFIoctl(MIAMIBPF_BASE_NAME,i,c,d)
-
- static __inline long
- _MiamiBPFIoctl(void *MiamiBPFBase,unsigned long i,unsigned long c,unsigned char *d) {
- struct Caos MyCaos;
- MyCaos.M68kCacheMode=IF_CACHEFLUSHALL;
- MyCaos.PPCCacheMode=IF_CACHEFLUSHALL;
- MyCaos.d0=(ULONG)i;
- MyCaos.d1=(ULONG)c;
- MyCaos.a0=(ULONG)d;
- MyCaos.caos_Un.Offset=-60;
- MyCaos.a6=(ULONG)MiamiBPFBase;
- return (long)PPCCallOS(&MyCaos);
- }
-
- #define MiamiBPFSetAbortmask(i,m) _MiamiBPFSetAbortmask(MIAMIBPF_BASE_NAME,i,m)
-
- static __inline void
- _MiamiBPFSetAbortmask(void *MiamiBPFBase,unsigned long i,unsigned long m) {
- struct Caos MyCaos;
- MyCaos.M68kCacheMode=IF_CACHEFLUSHALL;
- MyCaos.PPCCacheMode=IF_CACHEFLUSHALL;
- MyCaos.d0=(ULONG)i;
- MyCaos.d1=(ULONG)m;
- MyCaos.caos_Un.Offset=-66;
- MyCaos.a6=(ULONG)MiamiBPFBase;
- PPCCallOS(&MyCaos);
- }
-
- #define MiamiBPFFilter(pc,p,l,pt) _MiamiBPFFilter(MIAMIBPF_BASE_NAME,pc,p,l,pt)
-
- static __inline unsigned long
- _MiamiBPFFilter(void *MiamiBPFBase,void *pc,unsigned char *p,
- unsigned long l,char pt) {
- struct Caos MyCaos;
- MyCaos.M68kCacheMode=IF_CACHEFLUSHALL;
- MyCaos.PPCCacheMode=IF_CACHEFLUSHALL;
- MyCaos.a0=(ULONG)pc;
- MyCaos.a1=(ULONG)p;
- MyCaos.d0=(ULONG)l;
- MyCaos.d1=(ULONG)pt;
- MyCaos.caos_Un.Offset=-72;
- MyCaos.a6=(ULONG)MiamiBPFBase;
- return (unsigned long)PPCCallOS(&MyCaos);
- }
-
- #endif
-